/**
 * Created by Ji.wenjiang on 2016/9/6.
 */


angular.module('inspinia')
  .controller('hospitalCardCtrl', function ($scope, $timeout, $state, fileReader, _undefined,values,users) {
    // init();
    function init() {
      $scope.user = {};
      console.log(JSON.parse(localStorage.getItem('registerForm')));
      $scope.user=JSON.parse(localStorage.getItem('registerForm'));
      $scope.user.gender=$scope.user.gender=='0'?'男':'女';
      switch ($scope.user.marryStatus){
        case 1:$scope.user.marryStatus='已婚';
              break;
        case 2:$scope.user.marryStatus='未婚';
          break;
        case 3:$scope.user.marryStatus='其他';
          break;
      }
      switch ($scope.user.payType){
        case 1:$scope.user.payType='省保';
          break;
        case 2:$scope.user.payType='社保';
          break;
        case 3:$scope.user.payType='外保';
          break;
        case 4:$scope.user.payType='新农合';
          break;
        case 5:$scope.user.payType='新农合异地就医';
          break;
        case 6:$scope.user.payType='省本级异地就医';
          break;
        case 7:$scope.user.payType='离休';
          break;
        case 8:$scope.user.payType='自费';
          break;
        case 9:$scope.user.payType='公费';
          break;
        case 10:$scope.user.payType='铁路医保';
          break;

      }
   $scope.user.province=$scope.user.province.split("#")[1]+" "+$scope.user.city.split("#")[1];
      $scope.user.area=$scope.user.area.split("#")[1];
    }
    $scope.print =function () {
      window.print();
    }

  })
